import request from '@/utils/request'

export function getAllStudent() {
  return request({
    url: '/student/getAllStudent',
    method: 'get',
  })
}
export function search(keyWord) {
  return request({
    url: '/student/search',
    method: 'get',
    params: { keyWord }
  })
}
export function addOneStudent(data) {
  return request({
    url: '/student/addOneStudent',
    method: 'post',
    data
  })
}
export function updateOneStudent(data) {
  return request({
    url: '/student/updateOneStudent',
    method: 'post',
    data
  })
}
export function deleteOneStudent(sId) {
  return request({
    url: '/student/deleteOneStudent',
    method: 'get',
    params: {sId}
  })
}
export function getSelectedCourseInfo(sId) {
  return request({
    url: '/student/getSelectedCourseInfo',
    method: 'get',
    params: {sId}
  })
}
export function subscribeCourse(data) {
  return request({
    url: '/student/subscribeCourse',
    method: 'post',
    data
  })
}
export function cancelSubscribe(cId) {
  return request({
    url: '/student/cancelSubscribe',
    method: 'get',
    params: {cId}
  })
}
